package Homework;
//定义三个有参数无返回值方法，分别实现计算三角形，正方形，长方形的面积
public class test24 {
    public static void main(String[] args) {
    getsjxarea(2.2,2.2);
    getzfxarea(2.2,2.2);
    getcfxarea(2.2,2.2);
    }
    public static void getsjxarea(double a ,double b) {
        System.out.println("三角形的面积为：" + (a*b*0.5));
    }
    public static void getzfxarea(double a ,double b){
        System.out.println("正方形的面积为："+ (a*b));
    }
    public static void getcfxarea(double a ,double b){
        System.out.println("请输入长方形的面积：" + (a*b));
    }
}
